package com.smart.core.starter.exception;

/**
 * ApiException
 *
 * @author guxiaobai
 * @date 2018/11/28 21:25
 */

public class ApiException extends RuntimeException {

    /**
     * 错误码
     */
    private IError error;

    public ApiException(IError error) {
        super(error.getMsg());
        this.error = error;
    }

    public ApiException(String message) {
        super(message);
    }

    public ApiException(Throwable cause) {
        super(cause);
    }

    public ApiException(String message, Throwable cause) {
        super(message, cause);
    }

    public IError getErrorCode() {
        return error;
    }


}
